package com.boatAnchorAssistant.pojo.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;




/**
 * 【描 述】：
 * 【环 境】：J2SE 17
 * 【详 细】：
 *
 * @author 李松林
 * @version v1.0 2024/4/29 新建
 * @since 2024/4/29
 */
@Data
@Table
@AccEntity(value = "用户",type = EntityType.SERVICE_ENTITY)
@TableComment("用户")
public class User extends DomainBaseEntity<User> {


    /**
     * 头像
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "头像")
    private String photo;


    /**
     * 姓名
     */
    @TableField("`name`")
    @Column(type = MySqlTypeConstant.VARCHAR,
            length = 20,
            isNull = false,
            comment = "姓名")
    private String name;


    /**
     * 电话
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            length = 11,
            comment = "电话",
            isNull = false,
            defaultValue = "")
    private String phone;


    /**
     * 工号
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            length = 20,
            isNull = false,
            comment = "工号",
            defaultValue = "")
    private String number;



    /**
     * 所属部门id
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            length = 20, comment = "所属部门id",
            isNull = false,
            defaultValue = "0")
    private Long departmentId;


    /**
     * 邮箱
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "邮箱",
            isNull = false)
    private String email;


    /**
     * 用户名=账号
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "用户名=账号",
            isNull = false,
            defaultValue = "")
    private String account;


    /**
     * 密码
     */
    @TableField("`password`")
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "密码",
            isNull = false)
    private String password;


    /**
     * 所属企业id
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            length = 20, comment = "所属企业id",
            isNull = false,
            defaultValue = "0")
    private Long tenantId;


    /**
     * 是否为系统用户
     */
    @Column(type = MySqlTypeConstant.BIT,
            length = 1, comment = "是否为系统用户",
            isNull = false,
            defaultValue = "false")
    private Boolean isSystem;

    /**
     * 用户管理权限：0-普通权限 1-中级权限 2-高级权限
     */
    @Column(type = MySqlTypeConstant.INT,
            length = 1, comment = "用户管理权限：0-普通权限 1-中级权限 2-高级权限",
            isNull = false,
            defaultValue = "0")
    private Integer authorizedType;

    /**
     * 正面身份证图片地址
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "正面身份证图片地址")
    private String frontUrl;

    /**
     * 左侧身份证图片地址
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "左侧身份证图片地址")
    private String backUrl;

    /**
     * 右侧身份证图片地址
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "右侧身份证图片地址")
    private String handUrl;

    /**
     * 俯视身份证图片地址
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "俯视身份证图片地址")
    private String upUrl;

    /**
     * 仰视身份证图片地址
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "仰视身份证图片地址")
    private String downUrl;

}
